package com.rs.game.player.content.construction;

import java.util.ArrayList;

import com.rs.cache.loaders.ObjectDefinitions;
import com.rs.game.player.Player;

public class FurnitureInterface extends Furniture {
	
	public FurnitureInterface(House house) {
		super(house);
	}
	
//    public static void showGardenCenterBuildspot(Player p) {
//        int[] itemArray = {8168, 8172, 8169, -1, 8170, -1, 8171};
//        int[] itemAmt = {0, 0, 0, 0, 0, 0, 0};
//        String[] names = {"Exit portal", "Decorative rock", "Pond", "Imp statue", "Dungeon entrance"};
//        int[] level = {1, 5, 10, 15, 70};
//        String[][] need = {{"Iron bar: 10", "", "", "",}, {"Limestone brick: 5", "", "", "",}, {"Soft clay: 10", "", "", "",}, {"Limestone brick: 5", "Soft clay: 5", "", "",}, {"Marble block: 1", "", "", ""}};
//
//        p.frames.setItems(p, 396, 132, 8, itemArray, itemAmt);
//
//        for (int i = 0; i < 7; i++) {
//            if (i < 5) {
//                for (int i2 = 0; i2 < 4; i2++) {
//                    p.frames.setString(p, need[i][i2], 396, 98 + i * 5 + i2);
//                    p.frames.setString(p, names[i], 396, 97 + i * 5);
//                    p.frames.setString(p, "Lvl " + level[i], 396, 140 + i);
//                }
//            } else {
//                for (int i2 = 0; i2 < 4; i2++) {
//                    p.frames.setString(p, "", 396, 98 + i * 5 + i2);
//                    p.frames.setString(p, "", 396, 140 + i);
//                    p.frames.setString(p, "", 396, 97 + i * 5);
//                }
//            }
//        }
//
//        p.frames.showInterface(p, 396);
//    }
	
	public boolean showInterface(Player player, ArrayList<FurnitureObject> furnitures) {
		player.getInterfaceManager().sendInterface(396);
		int line = 14;
		for (FurnitureObject furniture : furnitures) {
			player.getPackets().sendIComponentText(396, line, ObjectDefinitions.getObjectDefinitions(furniture.getRealId()).name);
			
			line += 5;
		}
		player.getPackets().sendIComponentModel(396, 63, 4554);
		return true;
	}
	
}
